package com.lagou;

import com.lagou.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class  ServerBootstrap implements CommandLineRunner {

    @Autowired
    private UserServiceImpl userService;

    public static void main(String[] args) throws InterruptedException {
        System.out.println("服务端启动");
        SpringApplication.run(ServerBootstrap.class, args);
    }


    @Override
    public void run(String... args) throws Exception {
        userService.startServer("127.0.0.1",8999);
    }
}
